package com.nisco.dms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import com.nisco.dms.entity.DictionaryDtl;
import com.nisco.dms.repository.DictionaryDtlDao;
import com.nisco.dms.util.dwz.Page;
import com.nisco.dms.util.dwz.PageUtils;
@Service
public class DictionaryDtlService extends BaseService<DictionaryDtl, String>
{	
	@Autowired
	private DictionaryDtlDao dictionaryDtlDao;

	public DictionaryDtlService()
	{
		super();
	}

	@Autowired
	public DictionaryDtlService(DictionaryDtlDao dictionaryDtlDao)
	{
		super((JpaRepository<DictionaryDtl, String>)dictionaryDtlDao);
		this.dictionaryDtlDao = dictionaryDtlDao;
	}
	
	public List<DictionaryDtl> findByDictId(Page page,String dictId)
	{
		org.springframework.data.domain.Page<DictionaryDtl> pageDcitDtl=dictionaryDtlDao.findByDictId(PageUtils.createPageable(page), dictId);
		PageUtils.injectPageProperties(page, pageDcitDtl);
		return pageDcitDtl.getContent();
		
	}
	
	

}
